import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const userLoadingStore = defineStore('loading',() => {
	const loading = ref(false)
	function setLoading (val) {
		loading.value=val
	}
	return { loading, setLoading }
})

export const userMenuStore = defineStore('menu',() => {
	const menu = ref([])
	function setMenu (val) {
		menu.value=val
	}
	return { menu, setMenu }
},{ persist:true })

export const userIdStore = defineStore('userId',() => {
	const userId = ref()
	function setUserId (val) {
		userId.value=val
	}
	return { userId, setUserId }
},{ persist:true })

export const userAreaStore = defineStore('userArea',() => {
	const userArea = ref()
	function setUserArea (val) {
		userArea.value=val
	}
	return { userArea,setUserArea }
},{ persist:true })